<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','公众号用户']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>公众号用户</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn" style="width: calc(100% - 230px);">
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">时间类型</span>
									<select name="" class="top_module_select" [(ngModel)]="dateType">
										<option value="">请选择</option>
										<option value="1">创建时间</option>
										<option value="2">登录时间</option>
									</select>
								</div>
								<div class="selectDate top_module">
									<table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)" ></table-select-date>
								</div>
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">排序类型</span>
									<select name="" class="top_module_select" [(ngModel)]="sortType">
										<option value="">请选择</option>
										<option value="1">升序</option>
										<option value="2">降序</option>
									</select>
								</div>
								<button class="btn btn-primary" (click)="tableSearch()">查询</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="tableParam.searchKey" (change)="tableSearch()" class="search-input" placeholder="昵称">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>昵称</th>
										<th>性别</th>
										<th>头像</th>
										<th>最近登录日期</th>
										<th>创建日期</th>
										<th>平台绑定信息</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.nickName}}</td>
										<td>{{row.sexStr}}</td>
										<td><img class="imgPhoto" [src]="row.userPhoto"/></td>
										<td>{{row.updateTime}}</td>
										<td>{{row.createTime}}</td>
										<td>
											<button type="button" (click)="showRow(row,bindDetailModal)">查看</button>
										</td>
										<!-- <td *ngIf="isShowDelete">
                                            <button type="button" (click)="deleteRow(row)">删除</button>
                                        </td> -->
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>
<!-- 平台绑定详情 -->
<div bsModal #bindDetailModal="bs-modal" id="bindDetailModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"  style="overflow: auto;">
	<div class="modal-dialog modal-lg" style="width: 1000px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" (click)="cancelFactoryOnline(bindDetailModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">平台绑定详情</h4>
			</div>
			<div class="modal-body" style="padding: 15px;">
				<!-- <div class="page-header clearfix s_table_opreation" style="margin-top: 0px;margin-bottom: 15px;padding-bottom: 15px;">
					<div class="left page-header-btn">

						<sa-company-tree-car #factoryOnlineComponent companyTreeId="company4" wrapId="bindDetailModal" [isShowCarSort]="false" [isShowCarNum]="false" (companySelected)="onlinecompanySelected($event)"></sa-company-tree-car>


						<button type="button" class="btn btn-primary" (click)="factory_table_search()">查询</button>
						<button type="button" class="btn btn-primary" (click)="factoryAdd(addFactoryModal)">添加</button>

					</div>
					<div class="right top-search">
						<input type="text" id="factoryOnlineSearch" [(ngModel)]="factoryOnlineSearchKey" (change)="factory_table_search()" class="search-input" placeholder="厂区名称">
						<span class="top-search-box">
							<button class="top-search-btn" type="button" (click)="factory_table_search()"> <i class="fa fa-search"></i></button>
						</span>
					</div>
				</div> -->
				<div class="table_scroll">
					<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
						<thead>
							<tr>
								<th>平台名称</th>
								<th>平台编号</th>
								<th>平台用户名字</th>
								<th>平台用户编号</th>
								<th>平台手机号</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>

							<tr *ngFor="let row of bindDetailTableData; let i = index" [attr.data-index]="i" [ngClass]='{selected: row.isChecked }'>
								<td>{{row.platformName}}</td>
								<td>{{row.platformNumber}}</td>
								<td>{{row.userName}}</td>
								<td>{{row.userNumber}}</td>
								<td>{{row.userPhone}}</td>
								<td>{{row.createTime}}</td>
								<td>
									<button type="button" (click)="unbindRow(row)">解绑</button>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div *ngIf="bindDetailTableData.length == 0" style="text-align: center;color: #ccc;line-height: 80px;">暂无数据</div>
				<!-- <div class="table-fix clearfix">
					<paginator [totalRecords]="factoryOnlinetotalCount" [rows]="factoryOnlinePageSize" [currentPage]="factoryOnlineCurPage- 1" (onPageChange)="factoryPaginate($event)">
					</paginator>
					<button type="button" class="btn default refresh_btn" (click)="factoryTableRefresh()"><i class="fa fa-refresh"></i></button>
				</div> -->
			</div>
		</div>
	</div>
</div>
<!-- 平台绑定详情 end-->
<style>
	.imgPhoto{
		width: 30px;
	}
</style>